﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_PageDate : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string path = HttpUtility.UrlDecode(HttpContext.Current.Request.Url.PathAndQuery)
           .Replace("/ACC3_0/", "")
           .Replace(".aspx?1=", "\n")
           .Replace("&2=", "\n")
           .Replace("&3=", "\n");

        ImageButton1.ToolTip = "Refresh " + path;

        lblTimeCached.Text = DateTime.Now.ToLongDateString() + " " +  DateTime.Now.ToLongTimeString();
    }


    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string path = HttpContext.Current.Request.Url.AbsolutePath;
        HttpResponse.RemoveOutputCacheItem(path);
    }

}